/******************************************************************************
*    Copyright (C), 2022 by D2X studio. All rights reserved.                  *
*                                                                             *
*    @file:      main.c
*    @owner:     zhengjian.xie@gmail.com                                      *
*    @desc:                                                                   *
*    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +    *
* history:                                                                    *
*  <author>      <time>      <version>              <description>             *
*  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  *
*  |  Xzj |  20220411[23:07] | 1.0.0 |                  build              |  *
*  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  *
******************************************************************************/
#include "includes.h"

/** Program Entry */
int main(int argc, const char* argv[]) {

    // (1) print target
    sayHello();

    // (2) init before running
    app_init();

    // (3) looping
    app_loop();
    
    // (4) exit
    sayBye();

    return 0;
}


/*
 * =============================================================================
 *                            Main function implement
 * =============================================================================
 */

/** sayHello */
void sayHello(void) {
#if defined(TCU_SERVER)
    printf("Hello, I'm TCU server!\n");
#elif defined(TCU_CLIENT)
    printf("Hello, I'm TCU client!\n");
#else
    printf("Hello, I'm TCU app!\n");
#endif
}

/** sayBye */
void sayBye(void) {
#if defined(TCU_SERVER)
    printf("TCU server say goodbye for you!\n");
#elif defined(TCU_CLIENT)
    printf("TCU client say goodbye for you!\n");
#else
    printf("TCU app say goodbye for you!\n");
#endif
}
